Fixed some refactoring issues in LoginController