rewritten to make checks for anonymous user in pre_process_request filter. this fixes:#5721 - urls with ?format=txt are not redirected#5870 - ignoring everything that can occur during login request is a bad idea