Added `wrapWithOptions` function to allow for options after a callback.
Updated login with options to use `wrapWithOptions`