updated spec to reflect authentication scheme
implementing registration
refactoring to increase modularity