stored procedures and code for basic user stuff