Prevent MultiDictKeyError in login_logout view