ported over the remember me functionality