connecting client side auth state and server side session via xhr call in authmanager service