raise custom error on login failure