Fixed logging in the case of App:cleanExit(true). Also, don't write log for the 401s generated by basic auth support.