creating the static method for authorization