Implement auto login
Bugfixes for auto login
Merge branch 'develop'