How to get logged in user information by authentication from binderhub?

In my web, BinderHub launching url(such as ~~~/v2/gh/repo/master) is linked.
I want to develop that If there is a history logged in to the cookie, it is connected to the server, otherwise, it is connected to the launching page.

So far, when you click the link, you will be directed to the JupiterHub login page, and your server will be launched.
But, if you click the link secondly, you will be directly linked to launching url by cookie that you did login.
Then error which the user has running sever will be occurred.

Can I get information user is logged in from BinderHub?