Fixed login bug. Added email bit and logout functionality