first draft of the login system