Login, logout and session management work semi-perfectly