Login function implemented only for patient.