Fixed bugs and auto login