updated login/logout logic
Merge branch 'master' into yash
updated id to user_id