fixed a server authentication bug (exception handling)