added userlogin() function and moved to libs
importing logout.php