added user to the session once creates account and moved quote_smart() function to tools.php