Add auth & registration js logic