I have a couple of scripts that might help.
I've attached the files - had to add .txt to the end to get them to upload.
ScriptLoginDiffs.ps1 is a PowerShell script that compares two instances and generates a script to bring their logins in line, including SIDs, passwords, server roles, database roles (assuming a database of the same name exists on both instances). Call it with the following syntax:
.\ScriptLoginDiffs.ps1 SERVER1\INST1 SERVER2\INST2
All Login Permissions.sql is a TSQL script that scripts all login server permissions and roles, and database permissions and roles on an instance.
Hope this helps.