Added a little bit of functionality to the authorize button.