do some validation on login view