fixed handler for error on login