Modified some Authroization code.