made authentication optional and cleaned up code with boostrap 3.