Authorization works. Code is horrible :(