Update controllers.js

Added alert for registration