added login and register return user_id