Removed comments
Removed unused code
Added login listner that sets automatic logut time