Added logout and other features