register action & more code optimizations

added request parsing, DB operations and response generation for 'register'