added before_action filters to restrict access for users
improve UI and fix authentication bug