Login catches timeouts, displaying username, refactoring