first draft of login. Does not work.