Adding functionality for logging in after pressing enter