Add basic login and fix misc