Add login backend and buggy javascript