Added login / logout functionaility