move click handler into controller
fix template to new auth-structure
sourcecode documentation and small changes