changes to support remote logging in, and normal user authentication