Moved authorisation setup to separate file.