Move authorisation to separate file