Adds basic log in/out system and view permissions.
Cleans up the log in/out mechanics
wtf