Fix #1 localhost causing nil exception.
Use Rails method for finding domain. It will be more accurate if user
sets up the tld_length correctly in Rails.
Fix #2 message always hidden in Twitter Bootstrap bug.
Remove the unused 'invisible' class that is applied to message div
 which is always hidden by Bootstrap.
Generate assets in the vendor folder if asset pipeline is supported