adding reset, logout, fixing bugs