Added check for hostname nil to prevent error; changed _main_nav template to open admin interface in new window