added autologin option