add function login and logout
compelete function publish post