begun adding exception handling for login method