added signin/signout functions to deal with sessionStorage of encrypted profile key