While using OAuth check first for user with email if any is provided, otherwise check database for given username