added login() support for mobile