implemented login with email

Implemented login with email. Needs some extra work.