second round of code tweaks, login and registration