Fully implemet sign-in & sign-out