change login() method to return proxy object