Простой способ, который приходит на ум это хранение в localstorage данных типа:
- isAuth: true/false
а так же уникальный id, который отдает Firebase:
uid: NcefVvDqfHXqrj0IlvzfmLb2
$('a[href^="#"]').click(function (e) { 
       e.preventDefault();
          elementClick = $(this).attr("href");
        destination = $(elementClick).offset().top;
        $('html, body').animate( { scrollTop: destination }, 1000 );
       });destination = $(elementClick).offset().top;?$(document).ready(function(){
    $('a[href^="#"]').click(function () {
        var elementClick = $(this).attr("href"),
            destination = elementClick.offset().top;
        if($.browser.safari){
            $('body').animate( { scrollTop: destination }, 1000 );
        } else {
            $('html').animate( { scrollTop: destination }, 1000 );
        }
        return false;
    });
});      foreach ($kridName as $key => $val){ }