added auto-login and search