added login to get userid