RIA Services provides a Authentication Domain Service template to use for enabling windows or forms authentication in your Silverlight application. Most of the out-of-the-box setup works fine if your project has everything in a single assembly, but when building larger scale applications that may use a RIA Services Class Library, there are a few extra steps you'll need to take for everything to work correctly.
You'll know there is a problem finding your AuthenticationContext if you get this error:
The DomainContextType is null or invalid and there are no contexts generated from AuthenticationBase<T>
If you are setting up your WebContext ...