refactored LoginActivity