Fixed Interface

The getUser function now returns a User object and takes a string
representing an email address as an argument.
The getPermissions function takes a User object as an argument.
I also added comments.