Creates Conditional Logic for user Authentication