defined view function for user controller
logout if adminLogged in is true