fix some bugs in paths
Fix login and logout, who can edit the data