fix some bugs:
1. when user is delete, session and cookie will be cleared.
2. when user login, update last_login_date.