Finished most of the Authorization functionality.