remember login info and permission control