have the login page working; code still needs some refactoring