Fix for auth method: request.form replaced by request.get_json