set up environment from login