updated the code to implement remember me.