getting user details in register/login