converted login to Singleton