improved login to check for username