added validation to login page