Fix migration problems with access_level column. Write tests for log in and log out. Implement log in and log out with sessions.