Add login registration function