code modified for last_login

#Modifications:
1. When new user created entry for last login inserted
2. Last_login updated when existing user object is used
3. public function to retrieve last_login timestamp for a user