minor fixes and finished loging out.