login

Added some validation to the login method