Added logout functionality and fixed implementation of JPanel. DO NOT use setContentPane(), use setVisible() instead.