moved loginView method to user-view file