created functionality in login js