Fix login bug

If a user enters a blank input or user is not found in the database, it
throws an error because user['username'] and user['password'] are not
found types.