Detecting login status and profile of current user.