Working on authentication and session states