login,logout,session fixes