fix logic in controller and template for showing reg button