Steps toward admin sessions, refactored database