implement login using username or email, validates username functions