api: save last_login timestamp