Fixed short timeout. Added logout functionality