Added authentication logic(to be modified later)