Finished JWT implemenetation & various fixes