Small refactor of login... not working