made the postfields for login a dictionary