Add support for passing function as signInRequired extra condition

See #283 for more information.