Added methods to check if user exists and login validation.