added the login inside the helper
added the login inside the controller