add logout and updated to match api
merged + fixed some errors