Fixes typo in update method
Move logout and delete to the end of the delete method