Got tests working with proper authentication and fixed a lot of bad pointer mistakes in the server