login logic completed

Now I know how to make Pull Requests!