See https://github.com/themattharris/RelMeAuth/ for instructions on how to use it.
Tantek Çelik uses relmeauth.php on his site tantek.com for RelMeAuth powered sign-in.
Twitter returning 401 error
Make sure that you have a Callback URL set in your Twitter Apps settings (when signed into the Twitter account you are using for your RelMeAuth application, likely different than your personal Twitter account).
Not having one causes Twitter to believe your app is a Desktop Application and returns a 401 Unauthorized.
For more details for implementing the Twitter side of RelMeAuth: