Login/logout function on login controller/view