Fix ajax for login and register

Signed-off-by: netcho <kkotlarski@abv.bg>
Some little changes

Signed-off-by: netcho <kkotlarski@abv.bg>