Moved the password check into the model from the view
Work on moving logic out of views into the model