Fixed Null pointer exception for user log out