auto login initial functionality