Fix fatal error after the login. Ref #275