login: raising proper exception