create functions on controller to login and validate

Create the login view and the controller to login, logout and validate
this process