Improved a helper for links processing
Little fixes in auth system