fix login error with return http404 instead of raise. fix bug where a http404 was being escaped, causing an error