started breaking the login code into the MVC pattern