Fixed bugs, added login