Add Tests, Improved Environment Detection

Added several tests for UserController
Removed hostname based environment detection and replaced with environment variable based detection. For more information see:

Laravel 4.0:
https://github.com/laravel/framework/pull/1980#issuecomment-29253720

or 

Laravel 4.1:
http://fortrabbit.com/docs/cookbook/laravel-4#environment-detection-in-gt-4-1