user login logout and edit function