Added logout function and created some Util classes