Started working on api authentication, fixed a few errors and updated the error lib, have not really tested it out yet