Permissions

Added automatic adding to permission groups. 
The indentation problem makes it difficult to understand what's going on here. Python will treat this as having the return statement inside the for-loop and so this loop will only ever look at 1 user.