A lot of refactoring, moved use case logic from index to LoginController. I also refactored unnecessary if statements