Added more login code