public static UserDB checkIfLegit(String username, String password){
		Statement stmt=null;
		
		String searchQuery="SELECT * FROM users WHERE username='"+username+"' AND password='"+password+"'";
		try{
			dbManager=DBManager.checkInstance();
			con=dbManager.getFreeConnection();
			stmt=con.createStatement();
			rs=stmt.executeQuery(searchQuery);
			
			boolean more = rs.next();
			
			if(!more){
				userdb=null;
			}else if(more){
				userdb=new UserDB(rs.getInt("id"),rs.getString("username"),rs.getString("password"), rs.getString("email"),rs.getString("name"),rs.getString("lastname"));
			}
			
			
		}catch(Exception e){

		}finally{
		    if (rs != null)	{
	            try {
	               rs.close();
	            } catch (Exception e) {}
	               rs = null;
		    }
		    
		    if (stmt != null) {
	            try {
	               stmt.close();
	            } catch (Exception e) {}
	               stmt = null;
            }
		    
		    if (con != null) {
	            try {
	            	dbManager.returnBusyConnection(con);
	            } catch (Exception e) {
	            
	            }
	            con = null;
	        }
		}
		return userdb;
	}