Simplify login JS a lot