Save user id and type on login.