Add error callback to Login function