Some refactoring to allow users to stay the same. Still need to send cookies with requests.