-adding single sign on

Working code from Saurabh