finished basic authentication and session management