New login

Redoing the login to resolve #321