Added logging in with sessions
Fixed logging out