Barely working, dirty, session-based user authentication. To be improved.