add validate to login