middleware request.user bug fix

Added try-except for middleware request.user object for case when request doesn't have user object (had this bug in a project)