Implemenation of Registration and Login