User and logout patches